package headfirst.command.AudioPlayer;


/**
 * @author lxiaol
 * @date 2021年07月05日 18:59
 */
public class PlayCommand implements Command {

    //持有相应的接收者对象
    private Keypad receiver;

    public PlayCommand(Keypad receiver) {
        this.receiver = receiver;
    }

    /**
     * 执行方法
     */
    @Override
    public void execute() {
        System.out.println("播放" );
        receiver.action();
    }
}
